/* Copyright (c) 2013, Google Inc. Please see the AUTHORS file for details. */
/* All rights reserved.  Use of this source code is governed by a BSD-style */
/* license that can be found in the LICENSE file. */

@import url("packages/spark_widgets/common/spark_widget.css");
@import url("third_party/font_awesome/css/font-awesome.min.css");

@import url("lib/ui/widgets/listview.css");
@import url("lib/ui/widgets/treeview.css");
@import url("lib/ui/widgets/tabview.css");
@import url("lib/ui/widgets/imageviewer.css");

@import url("spark_common.css");

#modalBackdrop {
  display:none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0.25;
  z-index: 500;
}

/*
 * Split view
 */

#splitView {
  border-top: 1px solid #ddd;
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

[beforeSplit] {
  box-shadow: rgba(0, 0, 0, 0.2) 1px 0px 2px;
}

[afterSplit] {
  z-index: -1;
}

/*
 * Top-level toolbars and buttons
 */

.toolbar {
  height: 48px;
  border-bottom: 1px solid #ddd;
}

.toolbar > spark-button,
.toolbar > spark-menu-button {
  width: 36px;
  height: 36px;
  margin: 0;
}

#bottom-toolbar {
  border-top: 1px solid #ddd;
  bottom: 0;
  position: absolute;
  width: 100%;
}

cde-fab[command=show-new-project] {
  position: absolute;
  top: -20px;
  right: 10px;
  z-index: 1;
}

#navigationButtons {
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid #ddd;
  position: absolute;
  right: 0;
  width: 131px;
  z-index: 150;
}

/*
 * Tab bar
 */

.tabview-tabbar {
  margin-right: 131px;
  z-index: 1;
}

/*
 * Editor area
 */

#editorArea {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/*
 * File view area
 */

#fileViewArea {
  bottom: 48px;
  left: 0;
  position: absolute;
  right: 0;
  top: 48px;
}

#fileViewArea .listview-container {
  bottom: 0;
  left: 0;
  outline: 0;
  overflow-x: auto;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: 0;
}

#fileViewArea .listview-dragover {
  bottom: 0;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
}

#fileViewArea .listview-dragover.listview-dragover-active {
  border: 2px solid #aaf;
}

.listview-row {
  margin: 0 16px;
}

.fileview-filename-container {
}

.fileview-filename-container .filename {
  display: inline-block;
}

.fileview-filename-container.project .filename {
  font-size: 16px;
  top: 9px;
}

.listview-cell-highlighted .fileview-filename-container .filename {
  color: #fff;
}

.listview-cell-highlighted .fileview-filename-container .infoField {
  color: #fff;
}

.treeviewcell-status {
  background: #999;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;

  position: absolute;
  left: -16px;
  width: 0;
  top: 0;
  height: 23px;

  transition: width 0.4s;
}

.treeviewcell-status.project {
  height: 38px;
}

.treeviewcell-status.error {
  width: 8px;
  background: #d0021b;
}

.treeviewcell-status.warning {
  width: 8px;
  background: #DD3;
}

.treeviewcell-status.info {
  width: 8px;
  background: #9CC;
}

.fileview-filename-container .gitStatus {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  background: #999;

  position: absolute;
  top: 0;
  height: 23px;
  right: -16px;
  width: 0;

  transition: width 0.4s;
}

.fileview-filename-container.project > .gitStatus {
  height: 38px;
}

.fileview-filename-container .menu {
  opacity: 0;
  position: absolute;
  right: 0;
  width: 15px;
}

.fileview-filename-container .menu.open {
  opacity: 1;
}

.fileview-filename-container .filename {
  overflow: hidden;
  position: absolute;
  top: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.fileview-filename-container:hover .filename {
}

.fileview-separator .line {
  margin-top: 8px;
  border-top: 1px solid #ddd;
}

.listview-cell-highlighted .search-result-line,
.listview-cell-highlighted .search-result-file {
  color: #fff;
}

.gitStatus.dirty {
  width: 8px;
  background: #4285f4;
}

/*
 * File view's context menu
 */
#file-item-context-menu {
  top: 0;
  left: 0;
  position: fixed;
  z-index: 100;
  display: none;
}

#file-item-context-menu.open {
  display: block;
}

#file-item-context-menu .backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
}

/*
 * Search view area
 */
#showFileViewButton {
  font-size: 13px;
  margin-top: 20px;
  text-decoration: underline;
  text-transform: uppercase;
}

#showFileViewButton:hover {
  color: #444;
  cursor: pointer;
}

#searchViewArea.hidden, #fileViewArea.hidden {
  display: none;
}

#searchViewArea {
  background-color: #eee;
  bottom: 48px;
  left: 0;
  position: absolute;
  right: 0;
  top: 48px;
}

#searchViewArea .listview-container {
  bottom: 0;
  left: 0;
  outline: 0;
  overflow-x: auto;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: 0;
}

#searchViewPlaceholder,
#searchViewNoResult,
#fileViewFilterNoResult {
  background-color: #eee;
  bottom: 48px;
  color: #ccc;
  font-size: 18px;
  left: 0;
  padding-top: 60px;
  position: absolute;
  right: 0;
  text-align: center;
  top: 48px;
}

#searchViewPlaceholder.hidden,
#searchViewNoResult.hidden,
#fileViewFilterNoResult.hidden {
  display: none;
}

#fileFilterGroup {
  flex: 1;
  display: flex;
}

#fileFilter {
  flex: 1;
  height: 36px;
  padding: 10px 10px 10px 44px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

#fileFilter:focus {
  border: 1px solid #4285f4;
  box-shadow: 0 0 0 1px #4285f4;
  outline: none;
}

/*#fileFilter ~ #runButton,*/
/*#fileFilter ~ #mainMenu {*/
/*  transition: all 0.25s cubic-bezier(0.4, 0, 1, 1);*/
/*}*/

/*#fileFilter:focus.active ~ #runButton,*/
/*#fileFilter:focus.active ~ #mainMenu {*/
/*  opacity: 0;*/
/*  margin: 0;*/
/*  width: 0;*/
/*}*/

#moreSearchMenu {
  position: absolute;
  left: 92px;
  top: 10px;
  width: 32px;
  height: 32px;
}

#fileNotFoundPlaceholder {
  color: #ccc;
  display: block;
  font-size: 18px;
  margin-top: 60px;
  text-align: center;
}

.search-result-line {
  color: #888;
  font-size: 13px;
  overflow: hidden;
  position: absolute;
  text-overflow: ellipsis;
  top: 2px;
  white-space: nowrap;
  width: 100%;
}

.search-result-file {
  font-size: 16px;
  overflow: hidden;
  position: absolute;
  text-overflow: ellipsis;
  top: 10px;
  white-space: nowrap;
  width: 100%;
}

.search-max-results {
  color: #888;
  font-size: 12px;
  overflow: hidden;
  position: absolute;
  text-overflow: ellipsis;
  text-align: center;
  top: 10px;
  white-space: nowrap;
  width: 100%;
}

/*
 * In-editor FABs (markdown & Polymer) + markdown view
 */
#toggleMarkdownPreviewButton,
#openPolymerDesignerButton {
  position: absolute;
  width: 36px;
  height: 36px;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  fill: #7d7d7d;
  background-color: #ddd;
  border: 1px solid #777;
  opacity: 0.8;
}

#toggleMarkdownPreviewButton:hover,
#openPolymerDesignerButton:hover {
  opacity: 1;
}

#markdownContent {
  -webkit-font-smoothing: antialiased;
  bottom: 0px;
  font-family: inherit;
  overflow-y: auto;
  width: 100%;
  padding: 10px 15px;
  position: absolute;
  top: 0px;
  transition: opacity 250ms;
  z-index: 89;
  -webkit-user-select: text;
  user-select: text;
}

/*
 * Outline
 */

.outlineItem.topLevel.class:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.outlineItem {
  overflow: hidden;
  text-overflow: ellipsis;
}

.outlineItem.selected {
  background-color: rgba(255, 255, 255, 0.1);
}

.outlineItem.topLevel.class {
  margin-top: 10px;
  margin-bottom: 10px;
}

.outlineItem.topLevel.class,
.outlineItem.topLevel.class > a,
.outlineItem.topLevel.typedef,
.outlineItem.topLevel.typedef > a {
  color: #ddd;
}

.outlineItem.topLevel.typedef > a:before {
  content: 'typedef ';
  color: #888;
}

.outlineItem.topLevel.function,
.outlineItem.method,
.outlineItem.topLevel.function > a,
.outlineItem.method > a {
  color: #888;
}

.outlineItem.topLevel.function > a:after,
.outlineItem.method > a:after {
  content: '()';
}

.outlineItem.accessor,
.outlineItem.accessor > a {
  color: #77c;
}

.outlineItem.accessor.getter > a:before,
.outlineItem.accessor.getter > a:before {
  content: 'get ';
  color: #888;
}

.outlineItem.accessor.setter > a:before,
.outlineItem.accessor.setter > a:before {
  content: 'set ';
  color: #888;
}

.outlineItem.topLevel.variable,
.outlineItem.property,
.outlineItem.topLevel.variable > a,
.outlineItem.property > a {
  color: #77c;
}

.outlineItem .returnType {
  color: #666;
  margin-left: 0.5em;
}

.outlineItem a {
  white-space: nowrap;
  text-decoration: none;
}

.outlineItem a:hover {
  text-decoration: underline;
}

#outlineContainer {
  display: flex;
  flex-flow: row;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  bottom: 13px;
  position: absolute;
  right: 22px;
  top: 63px;
  transition: opacity 250ms;
  z-index: 100;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas',
      'source-code-pro', monospace;
  /* font-size is set programmatically */
}

#outlineContainer.collapsed {
  opacity: 0;
  pointer-events: none;
}

#outline ul {
  margin: 0;
  margin-left: 15px;
  padding: 0;
}

#outline > ul {
  margin-left: 0;
}

#outline {
  padding: 7px;
  overflow-y: auto;
}

#outlineResizer {
}

/*
 * Mini-map
 */
.minimap {
  right: 10px;
  width: 10px;
  bottom: 0;
  top: 0;
  position: absolute;
  z-index: 10;
}

.minimap-marker {
  border-radius: 2px;
  position: absolute;
  height: 6px;
  left: 1px;
  right: 1px;
  background: #DDD;
  cursor: pointer;
}

.minimap-marker.error {
  background: #d0021b;
}

.minimap-marker.warning {
  background: #DD3;
}

.minimap-marker.info {
  background: #9CC;
}

/*
 * Dialogs
 */

spark-dialog {
  top: 15%;
  left: 50%;
  width: 512px;
  margin-left: -256px;
}

/* For some reason, elements of dialogs don't inherit Roboto from :host */
spark-dialog * {
  font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 13px;
  -webkit-font-smoothing: auto;
}

spark-dialog#polymerDesignerDialog {
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
  width: initial;
  margin-left: initial;
}

spark-dialog#polymerDesignerDialog #polymerDesigner {
  display: block;
  box-sizing: border-box;
  border: 1px solid #ccc;
  flex: 1;
}

#gitRepoUrlCopyInBuffer {
  width: 0px;
  height: 1px;
  background: transparent;
  box-shadow: 0px 0px 0px;
  padding: 0px;
  border: 0px solid;
}

#aboutDialog #logo {
  margin-right: 40px;
}

#aboutDialog #analyticsOptIn {
  margin-top: 40px;
}

#aboutDialog #analyticsCheck {
  margin: 0 20px;
}

#errorMessage {
  max-height: 200px;
  overflow-y: auto;
}

#gitResetSettingsDone,
#preferenceResetResult {
  display: none;
  color: #F00;
  font-weight: 500;
  margin: 4px 0 0 4px;
}

#gitCommitList {
  max-height: 250px;
  overflow: auto;
  padding: 0 20px;
}

#gitCommitList h1 {
  font-size: 15px;
  margin-top: 20px;
  margin-bottom: 0px;
}

#gitCommitMessage {
  resize: vertical;
}

#gitChangeList {
  border-radius: 3px;
  border: 1px solid #cccccc;
  display: none;
  margin-bottom: 15px;
  max-height: 105px;
  overflow: auto;
  padding: 5px 14px;
}

#gitChangeLabel {
  top: 0px;
}

#gitStatusDiv {
  width: 100%;
}

#gitUserInfo.hidden {
  display: none;
}

#pushUrl {
  width: 20em;
}

.settings-label {
  width: 150px;
}

.settings-value {
  flex: 1;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 5px;
  color: #666;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.settings-block {
  width: 100%;
  height: 30px;
  background-color: white;
}

.change-setting-button {
  width: 30px;
  height: 30px;
}

.settings-value + .change-setting-button {
  margin-left: 5px;
}

.reset-setting-button {
  flex: 1;
  height: 100%;
}

.radio-button-dependency {
  margin: 10px 0 0 20px;
}

.input-label {
  display: flex;
  margin: 10px 0;
}

.input-label label {
  flex: 0 1 auto;
  width: 150px;
  position: relative;
  top: 9px;
}

.input-label input {
  flex: 1 1 auto;
}

[selectableTxt] {
  -webkit-user-select: text;
}

label {
  font-weight: 500;
}

.help-block {
  -webkit-user-select: text;
}

/* These two are special (secondary) */
label[for="analyticsCheck"],
label[for="stripWhitespace"] {
  font-weight: 400;
}

#aboutDialog-icon {
  display: inline-block;
  vertical-align: middle;
}

#aboutDialog-text {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

#directoryLabel {
  overflow: hidden;
  white-space: nowrap;
}

.form-control-static {
  overflow: hidden;
  white-space: nowrap;
}

/*
 * Ace overrides.
 */

.ace_gutter-cell {
  color: #aaa;
}

div.ace_gutter {
  z-index: 0;
}

div.ace_gutter-cell.ace_error {
  background-image: url("images/error_icon.png");
}

div.ace_gutter-cell.ace_warning {
  background-image: url("images/warning_icon.png");
}

div.ace_gutter-cell.ace_info,
.ace_dark div.ace_gutter-cell.ace_info {
  background-image: url("images/info_icon.png");
}

.ace-tooltip-divider {
  background-color: gray;
  height: 1px;
  margin: 3px -4px;
}

img.ace-tooltip {
  border: none;
  display: inline;
  margin-left: 3px;
  margin-bottom: 3px;
}

.ace_link_marker {
  position: absolute;
  border-bottom: 1px solid white;
}

div.ace_search.right {
  background-color: #eee;
  border-radius: 0;
  border-bottom-left-radius: 2px;
  border-right: none;
  border-left: 1px solid #dadada;
  width: 307px;
  max-width: none;
  padding-right: 4px;
  z-index: 101;
}

div.ace_search_form *,
div.ace_replace_form * {
  /* Can't use 'inherit' here: Ace overrides that. */
  font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 12px;
}

div.ace_search_form,
div.ace_replace_form {
  display: flex;
  width: 277px;
}

input.ace_search_field {
  flex: 1;
}

button.ace_searchbtn,
button.ace_replacebtn {
  font-weight: 500;
}

button.ace_replacebtn {
  color: #7d7d7d;
  padding-left: 5px;
  padding-right: 5px;
}

button.ace_searchbtn:hover,
button.ace_replacebtn:hover {
  background-color: #eee;
}

button.ace_replacebtn:active,
button.ace_searchbtn:active {
  outline: none;
}

div.ace_search_options {
  text-align: left;
  margin-left: -2px;
}

div.ace_search_options > .ace_button.checked {
  border-color: #4281f4;
}

button.ace_searchbtn_close {
  position: absolute;
  top: -1px;
  right: 0;
  height: 24px;
  width: 24px;
  padding: 0;
  opacity: 0.5;
  background: url(images/close.svg);
}

button.ace_searchbtn_close:hover {
  background-color: transparent;
  background-position: 0 0;
  opacity: 1.0;
}

button.ace_searchbtn_close:active {
  outline: none;
}

button.ace_searchbtn.next {
  background: #fff url(images/find-next.svg);
  background-position-x: 1px;
}

button.ace_searchbtn.prev {
  background: #fff url(images/find-prev.svg);
  background-position-x: 1px;
}

button.ace_searchbtn.next:hover,
button.ace_searchbtn.prev:hover {
  background-color: #eee;
}

button.ace_searchbtn[action="findAll"] {
  display: none;
}

.ace_marker-layer .ace_selected-word {
  border-top-width: 2px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

/*
 * - end Ace overrides.
 */
